﻿using personalplaner.dataprovider.services;
using personalplaner.dataprovider.common;
using personalplaner.dataprovider.dienstplan;

namespace personalplaner.dataprovider
{
    public static class DataServices
	{
		#region Stammdaten

		static PersonDataService _persondataservice;
        public static PersonDataService PersonalService
        {
            get
            {
                if (_persondataservice == null)
                    _persondataservice = new PersonDataService();
                return _persondataservice;
            }
        }

        static AnstellungDataService _anstellungdataservice;
        public static AnstellungDataService AnstellungeService
        {
            get
            {
                if (_anstellungdataservice == null)
                    _anstellungdataservice = new AnstellungDataService();
                return _anstellungdataservice;
            }
        }

        static PensumDataService _pensumservice;
        public static PensumDataService PensumService
        {
            get
            {
                if (_pensumservice == null)
                    _pensumservice = new PensumDataService();
                return _pensumservice;
            }
        }

		static AbteilungDataService _abteilungservice;
        public static AbteilungDataService AbteilungService
        {
            get
            {
                if (_abteilungservice == null)
                    _abteilungservice = new AbteilungDataService();
                return _abteilungservice;
            }
		}

		static DiensteDataService _diensteservice;
		public static DiensteDataService DiensteService
		{
			get
			{
				if (_diensteservice == null)
					_diensteservice = new DiensteDataService();
				return _diensteservice;
			}
		}

		static CommonDataService _commonservice;
		public static CommonDataService CommonService
		{
			get
			{
				if (_commonservice == null)
					_commonservice = new CommonDataService();
				return _commonservice;
			}
		}

		#endregion

		static DatabaseConnectorService _databaseservice;
		public static DatabaseConnectorService DatabaseService
		{
			get
			{
				if (_databaseservice == null)
					_databaseservice = new DatabaseConnectorService();
				return _databaseservice;
			}
		}

		#region Plan

		static SchemaDataService _planlayoutservice;
		public static SchemaDataService PlanLayoutService
		{
			get
			{
				if (_planlayoutservice == null)
					_planlayoutservice = new SchemaDataService();
				return _planlayoutservice;
			}
		}

		static PlanDataService _planservice;
		public static PlanDataService PlanService
		{
			get
			{
				if (_planservice == null)
					_planservice = new PlanDataService();
				return _planservice;
			}
		}

		#endregion

        #region Options

        static OptionsDataService _optionsservice;
        public static OptionsDataService OptionsService
        {
            get
            {
                if (_optionsservice == null)
                    _optionsservice = new OptionsDataService();
                return _optionsservice;
            }
        }

        #endregion

    }
}
